package evaluacredito.modelo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 * The persistent class for the usuario database table.
 * 
 */
@Entity
@Table(name = "usuario")
@NamedQueries({
		@NamedQuery(name = "Usuario.findAll", query = "SELECT us FROM Usuario us"),
		@NamedQuery(name = "Usuario.findByIdUsu", query = "SELECT us FROM Usuario us WHERE us.idUsu = :idUsu"),
		@NamedQuery(name = "Usuario.findByNomUsu", query = "SELECT us FROM Usuario us WHERE us.nomUsu = :nomUsu"),
		@NamedQuery(name = "Usuario.findByClave", query = "SELECT us FROM Usuario us WHERE us.clave = :clave") })
public class Usuario implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Basic(optional = false)
	@Column(name = "idUsu")
	private Integer idUsu;
	@Column(name = "clave")
	private String clave;
	@Column(name = "nomUsu")
	private String nomUsu;

	public Usuario() {
	}

	public Integer getIdUsu() {
		return this.idUsu;
	}

	public void setIdUsu(Integer idUsu) {
		this.idUsu = idUsu;
	}

	public String getClave() {
		return this.clave;
	}

	public void setClave(String clave) {
		this.clave = clave;
	}

	public String getNomUsu() {
		return this.nomUsu;
	}

	public void setNomUsu(String nomUsu) {
		this.nomUsu = nomUsu;
	}

	@Override
	public int hashCode() {
		int hash = 0;
		hash += (idUsu != null ? idUsu.hashCode() : 0);
		return hash;
	}

	@Override
	public boolean equals(Object object) {
		// TODO: Warning - this method won't work in the case the id fields are
		// not set
		if (!(object instanceof Usuario)) {
			return false;
		}
		Usuario other = (Usuario) object;
		if ((this.idUsu == null && other.idUsu != null)
				|| (this.idUsu != null && !this.idUsu.equals(other.idUsu))) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "evaluacredito.modelo.Usuario[idUsu=" + idUsu + "]";
	}

}